module.exports = function (sequelize) {
    var model = sequelize.define("userInfo", {
            "userId": {
                type: sequelize.DataTypes.INTEGER,
                allowNull: false,
                primaryKey: true,
                comment: "关联user.id"
            },
            "nikename": {
                type: sequelize.DataTypes.STRING(20),
                allowNull: true,
                comment: "用户昵称"
            },
            "headPhotoPath": {
                type: sequelize.DataTypes.STRING(250),
                allowNull: true,
                comment: "用户头像"
            },
            "gengder": {
                type: sequelize.DataTypes.STRING(20),
                allowNull: true,
                comment: "性别"
            }
        },
        {
            "tableName": "user_info"
        });
    model.initRelation = function () {
        model.belongsTo(db.models.gender, {foreignKey: "gengder", constraints: false});
        model.belongsTo(db.models.user, {foreignKey: "userId", constraints: false});
    }
    model.initData = new Array();
    model.initData.push({
        userId: 1,
        nikename: "刘欢",
        gengder: "1"
    });
    model.initData.push({
        userId: 2,
        nikename: "ggaaaaa",
        gengder: "1"
    });
}
